package com.springboot.fwwb09.service;


import com.springboot.fwwb09.dao.gzbjDAO;
import com.springboot.fwwb09.entity.gzbj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional//控制事务
public class gzbjServiceImpl implements gzbjService {

    @Autowired
    private gzbjDAO gzbjDAO;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<gzbj> findAll() {
        return gzbjDAO.findAll();
    }
}
